﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using outREACH.App_Code;

namespace outREACH
{
    public partial class MemeberMain : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Username"] != null)
            {
                List<Users> results = Users.GetUser();
                foreach (Users u in results)
                {
                    if (Session["UserName"].ToString() == u.userName.ToString())
                    {
                        Image1.ImageUrl = u.imagePath;
                    }
                }
            }
            else
            {
                Response.Redirect("~/Default.aspx");
            }
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
            Response.Redirect("~/RedirectLogout.aspx");
        }
    }
}